package org.example.partnerbacked.service;

<<<<<<< HEAD
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
=======

>>>>>>> 515eae65c6ba5dc43fc118901c72b817d3b49dba
import jakarta.servlet.http.HttpServletRequest;
import org.example.partnerbacked.model.User;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author 70556
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2024-12-02 11:15:27
*/
public interface UserService extends IService<User> {
    /**
     * 用户登录
     * @param userAccount
     * @param userPassword
     * @param request
     * @return
     */

    User userLogin(String userAccount, String userPassword, HttpServletRequest request);

    /**
     * 注册
     * @param userAccount
     * @param userPassword
     * @param checkPassword
     * @param planetCode
     * @return
     */

    long userRegister(String userAccount, String userPassword, String checkPassword, String planetCode);

    /**
     * 退出登陆
     * @param request
     * @return
     */
    int userLogout(HttpServletRequest request);

    /**
     *
     * @param userByMySql
     * @return
     */
    User getSafetyUser(User userByMySql);


    /**
     * 判断是否为管理员
     * @param request
     * @return
     */
    boolean isAdmin(HttpServletRequest request);

    /**
     * 根据标签搜索用户
     * @param tagNameList
     * @return
     */
    List<User> searchUsersByTags(List<String> tagNameList);

    /**
     *
     * @param user
     * @param request
     * @return
     */

    int updateUser(User user, HttpServletRequest request);
    /**
     * 匹配用户
     *
     *
     */

    List<User> matchUsers(long num, HttpServletRequest request);
<<<<<<< HEAD

    /**
     * 推荐用户
     * @param pageSize
     * @param pageNum
     * @param request
     * @return
     */
    Page<User> recommendUsers(long pageSize, long pageNum, HttpServletRequest request);
=======
>>>>>>> 515eae65c6ba5dc43fc118901c72b817d3b49dba
}
